/**
 * @param {ListNode} head
 * @param {number} k
 * @return {ListNode}
 */
 function getKthFromEnd(head, k) {
    let first = head;
    let l = 0
    while(first) {
        first = first.next;
        l++;
    }
    let i = 0;
    while(i < l-k) {
        head = head.next;
        i++;
    }
    return head;
 };
 
 